package cn.huiyunche.base.service.enums;

/**
 * 人送取消订单 枚举
 *
 * @author hdy [Tuffy]
 */
public enum TmsCancelCodeEnum {

    CANCEL_101(101, "不存在相应的订单序号和司机的指令"),

    CANCEL_102(102, "该订单承运车队非知车，不可以取消"),

    CANCEL_103(103, "该指令已发运，不可取消"),

    OK(200, "成功");


    private final int value;
    private final String text;

    TmsCancelCodeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static TmsCancelCodeEnum getByValue(int value) {
        for (TmsCancelCodeEnum temp : TmsCancelCodeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
